<?php
namespace app\common\validate;

use think\Validate;

class ExpensesValidate extends Validate
{
    protected $rule =   [
        'amount|报销金额'   => 'require|number|gt:0',
        'times|日期'        => 'require|date',
        'type|类型'         => 'require|number',
        'desc|描述'         => 'require|length:1,200',
    ];
    
    protected $scene = [
        /** api */
        'add'    => ['amount', 'times', 'type', 'desc'],
    ];
}